#include "types.h"
#include "uthread.h"
#include "user.h"


void crap(void* p);

int main(int argc, char *argv[])
{
//printf(1,"%p\n",&crap);
//printf(1,"%p\n",&main);
printf(1,"started\n");
uthread_init();
printf(1,"init done\n");
if(uthread_create(crap,0)>=0)
	printf(1,"create done\n");
else
	printf(1,"create FAILED\n");
//uthread_yield();
uthread_join(1);
printf(1,"yield done\n");
  exit();
}

void crap(void* p)
{
int i;
for(i=0;i<10;i++)
printf(1,"UTHREAD%d\n",getAlarm());
uthread_yield();
print_uthreads();

}

